package com.tanhua.dubbo.server.api;

import com.tanhua.dubbo.server.pojo.Video;
import com.tanhua.dubbo.server.vo.PageInfo;

/**
 * @author feihao
 * @version 1.0
 * @date 2021/7/4 18:43
 */
public interface VideoApi {

    /**
     * 保存小视频
     *
     * @param video
     * @return
     */
    String saveVideo(Video video);


    /**
     * 查询小视频列表
     *
     * @param userId
     * @param page
     * @param pageSize
     * @return
     */
    PageInfo<Video> findVideoList(Long userId, Integer page, Integer pageSize);


    /**
     * 根据videoId查询视频
     *
     * @param videoId
     * @return
     */
    Video queryVideoById(String videoId);

    /**
     * 关注用户
     *
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean followUser(Long userId, Long followUserId);

    /**
     * 取消关注用户
     *
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean unFollowUser(Long userId, Long followUserId);


    /**
     * 查询用户是否已经关注
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean isFollowUser(Long userId, Long followUserId);
}
